var app = getApp();
Page({
  data: {
    userInfo: {},
    isLogin:false
  },
  onLoad: function () {
    var that = this
    //调用应用实例的方法获取全局数据
    app.getUserInfo(function (userInfo) {
      that.setData({
        userInfo: userInfo
      })
      wx.request({
          url: app.globalData.baseUrl + 'weixin/checkLogin',
          data: { nickName: userInfo.nickName},
          header: {
              'content-type': 'application/json'
          },
          success: function (res) {
              console.log(res)
              that.setData({ isLogin: res.data });
          }
      });
    });
  },
  onShow: function () {
  },
  accessCode:function(){
    
  },
  accountBind: function () {
    wx.navigateTo({
      url: '/page/sys/accountBind/accountBind'
    })
  },
  accountLogin: function () {
    wx.navigateTo({
      url: '/page/sys/accountLogin/accountLogin'
    })
  }
})